<?php
/**
 * Created by PhpStorm.
 * User: admin
 * Date: 2017/5/18
 * Time: 19:43
 */

namespace common\services;


class FavoriteWorksSve extends BaseSve
{
    /**
     * 统计用户收藏的蛋糕作品个数 BY:lihouse
     * @param $memberId
     * @return int
     */
    public function addUp($memberId):int
    {
        $rs = $this->getList(['member_id' => $memberId]);
        if ($rs['code'] === 0) {
            return count($rs['data']['list']);
        } else {
            return 0;
        }
    }
}